<template>
  <div class="table_container">
    <el-table
      :data="deviceFileList"
      border
      height="440px"
      class="table_dialog">
      <mes-col-comp :key="index" v-for="(column, index) in deviceFileListCol" :column="column"></mes-col-comp>
      <el-table-column
        className="break_left"
        :resizable="false"
        prop="turnoverNumber"
        label="设备文件"
        show-overflow-tooltip>
        <template slot-scope="scope">
          <p class="link_item">
            <span
              v-for="(item, index) in scope.row.uploadDeviceFileHistorie"
              :key="index"
              @click="$downByBlob(item.id, item.fileName)">
              {{item.fileName}}{{scope.row.uploadDeviceFileHistorie.length-1 !== index ? ',' : ''}}
            </span>
          </p>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import deviceFileListCol from './deviceFileListCol'
export default {
  name: 'DeviceFileListTab',
  data() {
    return {
      deviceFileListCol: deviceFileListCol
    }
  },
  props: {
    deviceFileList: {
      type: Array,
      defaultProps: []
    }
  }
}
</script>

<style lang="less">
  .link_item span{
    color: #0066cc;
    cursor: pointer;
  }
</style>
